const path = require('path');
module.exports = {
  dev: {
    env: require('../.env.development'),
    host: '0.0.0.0',
    port: 8019,
    autoOpenBrowser: false,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      /*'/api': {
        target: 'http://192.168.3.10:9999',
        pathRewrite: { '^/api': '' },
        changeOrigin: true
      },
      '/auth': {
        target: 'http://192.168.3.10:3030',
        pathRewrite: { '^/auth': '' },
        changeOrigin: true
      }*/
    },
    errorOverlay: true,
    poll: false,
    useEslint: true,
    showEslintErrorsInOverlay: false,
    productionSourceMap: false,
    devtool: 'cheap-source-map',
    cssSourceMap: false,
  },
  build: {
    env: require('../.env.production'),
    index: path.resolve(__dirname, '../dist/index.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    productionSourceMap: false,
    devtool: 'cheap-source-map',
    productionGzip: true,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report || false,
    generateAnalyzerReport: process.env.npm_config_generate_report || false,
  },
};
